<?php
$this->breadcrumbs=array(
	Yii::t('ShopModule.shop', 'Categories')=>array('shop/index'),
	$model->title,
);

?>
<table class="categories-body">
<tr><td>
<h2> <?php echo $model->title; ?></h2>
</td></tr>


    <?php
        $loop=1;
        foreach(Category::model()->findAll(array("condition"=>"parent_id =  $model->category_id","order"=>"category_id")) as $category)//ivan
	{
            if($loop==1)
                echo '<tr class="odd"><td>
                    <div class="dashboardIcons2 span-192">';
            echo '<div class="dashIcon span-3">';
            if($category->image_url)
             echo '<a href="index.php?r=shop/category/view&id='.$category->category_id.'">
                 <img width="50" height="50" src="'.$category->image_url.'"></img>
                 </a>';
            else 
                echo '<a href="index.php?r=shop/category/view&id='.$category->category_id.'">
                 <img width="50" height="50" src="./assets/18d0d8f1/no-pic.jpg"></img>
                 </a>';
            echo '<div class="dashIconText ">
                <a href="index.php?r=shop/category/view&id='.$category->category_id.'">
                '.$category->title.'
                </a>
                </div>';
            echo '</div>';
            $loop = $loop+1;
        }
        if($loop>1)
            echo '</div>        
                </td></tr>';
    ?>        

<tr><td>
<?php
//	foreach($model->Products as $product) {
//		$this->renderPartial('/products/_view_fivegrid', array('data' => $product));
//}

$tempModle=  Products::model()->categorySearch($model->category_id);
$this->widget('application.widgets.EColumnListView.EColumnListView', array(
	'dataProvider'=>  $tempModle,
	'itemView'=>'/products/_view_new',
));
?>
</td></tr>
</table>
<div class="clear"> </div>